package gestion.camping.dto;

import gestion.camping.utils.DateFormatUtils;

import java.util.Date;

public class Saison {
	
	private long id;
	private String libelle;
	private Date dateDebut;
	private Date dateFin;
	
	public Saison(){
	}
	
	public Saison(long id, String libelle, Date dateDebut, Date dateFin){
		this.id = id;
		this.libelle  = libelle;
		this.dateDebut = dateDebut;
		this.dateFin = dateFin;
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getLibelle() {
		return libelle;
	}

	public void setLibelle(String libelle) {
		this.libelle = libelle;
	}

	public Date getDateDebut() {
		return dateDebut;
	}

	public void setDateDebut(Date dateDebut) {
		this.dateDebut = dateDebut;
	}

	public Date getDateFin() {
		return dateFin;
	}

	public void setDateFin(Date dateFin) {
		this.dateFin = dateFin;
	}
	
	public String getDateDebutString() {
		if(dateDebut != null){
			return DateFormatUtils.formatDate(dateDebut);
		}else{
			return null;
		}
	}
	
	public String getDateFinString() {
		if(dateFin != null){
			return DateFormatUtils.formatDate(dateFin);
		}else{
			return null;
		}
	}
}
